<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="js/jquery.min.js"></script>
  <script src="js/jquery.form.min.js"></script>
</head>
<body>
文件列表：
<div id="fileListID">
<a href="#">abc.doc</a>&nbsp;&nbsp;<a href="#" onclick="deleteFile(fileId)"> x</a>
</div>
  <script>
    $(function () {
    	$.ajax({
            url: './file/findFileList?sysCode=project&businessId=123&businessNode=1',
            type: 'get',
            processData: false,
            contentType: false,
            success: function (res, statusText, headers) {
              if (res.success) {
                jsonData = res.data;
                var content = '';
                for (var i=0;i<jsonData.length;i++) {
                	content += '<a href=\'./file/viewFile?fileId='+jsonData[i].id+'\'>'+jsonData[i].oldFileName+'</a>&nbsp;&nbsp;<a href=\'#\' onclick=\"deleteFile(\''+jsonData[i].id+'\')\"> x</a><br/>';
                }
                $('#fileListID').html(content);
              } else {
                alert('失败');
              }
            }
          })
    })

    function deleteFile(fileId) {
    	$.ajax({
            url: '/comm-file-server/file/deleteFile?fileId='+fileId,
            type: 'get',
            processData: false,
            contentType: false,
            success: function (res, statusText, headers) {
              if (res.success) {
                window.location.reload();
              } else {
                alert('失败');
              }
            }
          })
    }

  </script>
</body>

</html>